package utils

import (
	"encoding/json"
	"fmt"
	"gitee.com/layheart/gameServer/api"
)

// GetRequestData 获取请求参数
func GetRequestData(requestData api.RequestData) (string, error) {
	req, err := json.Marshal(requestData)
	if err != nil {
		fmt.Println("请求参数转换错误-err:", err)
		return "", err
	}

	return string(req), nil
}
